﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Landpy.CruiseControlNet.FacadeInterface.ConfigurationModule
{
    public abstract class SecurityUser : IPrimaryKey
    {
        [Browsable(false)]
        [XmlIgnore]
        public Guid Id { get; private set; }

        [Category("Advanced")]
        [Description("The type the user.")]
        [XmlIgnore]
        public SecurityUserType Type { get; private set; }

        [Category("Basic")]
        [Description("The name of the user.")]
        [XmlAttribute("name")]
        public string Name { get; set; }

        protected SecurityUser(SecurityUserType securityUserType)
        {
            Type = securityUserType;
            this.Id = Guid.NewGuid();
        }
    }
}